
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>向🐑</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta property="og:type" content="website">
<meta property="og:title" content="向🐑">
<meta property="og:url" content="https://kziwws.github.io/page/2/index.html">
<meta property="og:site_name" content="向🐑">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="kziwws">
<meta name="twitter:card" content="summary">
  
    <link rel="alternative" href="/atom.xml" title="向🐑" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
<link rel="stylesheet" href="/css/style.css">

  <!--[if lt IE 9]><script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.min.js"></script><![endif]-->
  <!--  -->
  
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?51e08434b847b38641d02f11be4eb143";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


<meta name="generator" content="Hexo 4.2.1"></head>
<body>
<div id="container">
  <div id="wrap">
    <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">向🐑</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">一只站在树上的鸟，从来不害怕树枝突然折断，因为它相信的不是树枝，而是它自己的翅膀！</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">首页</a>
        
          <a class="main-nav-link" href="/tags/technology">编程技术</a>
        
          <a class="main-nav-link" href="/tags/poetry">诗</a>
        
          <a class="main-nav-link" href="/tags/life">生活随笔</a>
        
          <a class="main-nav-link" href="/archives">所有文章</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        
        
        <a href="javascript:;" class="popup-trigger nav-icon" id="nav-search-btn"></a>
        
      </nav>
      <div id="search-form-wrap">
        <form action="//www.baidu.com/baidu" method="get" accept-charset="utf-8" class="search-form">
          <input type="search" name="word" maxlength="20" class="search-form-input" placeholder="Search">
          <input type="submit" value="" class="search-form-submit">
          <input name=tn type=hidden value="bds">
          <input name=cl type=hidden value="3">
          <input name=ct type=hidden value="2097152">
          <input type="hidden" name="si" value="kziwws.github.io">
        </form>
      </div>
    </div>
  </div>
  <div class="local-search-inner"><div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <span id="icon-search"></span>
    </span>
    <span class="popup-btn-close">
      <span id="icon-close"></span>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off"
             placeholder="本地搜索..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div></div>
</header>



    <div class="outer">
      <section id="main">
  
    <article id="post-technology20220916182205" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2022/09/16/technology20220916182205/" class="article-date">
  <time datetime="2022-09-16T10:22:05.000Z" itemprop="datePublished">2022-09-16</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/error/">error</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2022/09/16/technology20220916182205/">Pycharm运行闪退报parseVMOptions PYCHARM_VM_OPTIONS</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h5 id="Pycharm之前安装了2021版本，然后破解了过后，不知道什么原因可能把文件删除掉了，然后无论重装版本都不可行，报错如下。"><a href="#Pycharm之前安装了2021版本，然后破解了过后，不知道什么原因可能把文件删除掉了，然后无论重装版本都不可行，报错如下。" class="headerlink" title="Pycharm之前安装了2021版本，然后破解了过后，不知道什么原因可能把文件删除掉了，然后无论重装版本都不可行，报错如下。"></a>Pycharm之前安装了2021版本，然后破解了过后，不知道什么原因可能把文件删除掉了，然后无论重装版本都不可行，报错如下。</h5><p>pycharm[5868:93254] allVms required 1.8*,1.8+<br>pycharm[5868:93258] Current Directory: /Applications/PyCharm.app/Contents/MacOS<br>pycharm[5868:93258] <font color="red">parseVMOptions: PYCHARM_VM_OPTIONS = /Users/mac/Desktop/未命名文件夹/jetbra/vmoptions/pycharm.vmoptions</font><br>pycharm[5868:93258] parseVMOptions: platform=-1 user=-1 file=(null)<br>pycharm[5868:93258]  Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘NSWindow drag regions should only be invalidated on the Main Thread!’<br> First throw call stack:<br> (<br>0   CoreFoundation                      0x00007ff81b5b943b <em>exceptionPreprocess + 242<br>    1   libobjc.A.dylib                     0x00007ff81b108e25 objc_exception_throw + 48<br>    2   CoreFoundation                      0x00007ff81b5e15d6 <em>CFBundleGetValueForInfoKey + 0<br>    3   AppKit                              0x00007ff81e688161 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 307<br>    4   AppKit                              0x00007ff81e674f4f -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1247<br>    5   AppKit                              0x00007ff81e80f412 -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 50<br>    6   AppKit                              0x00007ff81e674a69 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42<br>    7   AppKit                              0x00007ff81e80f3cb -[NSPanel initWithContentRect:styleMask:backing:defer:] + 59<br>    8   AppKit                              0x00007ff81e672f88 -[NSWindowTemplate nibInstantiate] + 354<br>    9   AppKit                              0x00007ff81e64142a -[NSIBObjectData instantiateObject:] + 222<br>    10  AppKit                              0x00007ff81e640b9c -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 476<br>    11  AppKit                              0x00007ff81e63567f loadNib + 420<br>    12  AppKit                              0x00007ff81e634a67 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 737<br>    13  AppKit                              0x00007ff81e634691 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201<br>    14  AppKit                              0x00007ff81e9877a0 -[NSAlert init] + 101<br>    15  pycharm                             0x000000010b885ae8 -[Launcher buildArgsFor:] + 1416<br>    16  pycharm                             0x000000010b885fd4 -[Launcher launch] + 340<br>    17  Foundation                          0x00007ff81c39082c _NSThreadstart</em></em> + 1009<br>    18  libsystem_pthread.dylib             0x00007ff81b466259 _pthread_start + 125<br>    19  libsystem_pthread.dylib             0x00007ff81b461c7b thread_start + 15<br>)<br>libc++abi: terminating with uncaught exception of type NSException<br>zsh: abort      ./pycharm<br>macPro MacOS % </p>
<p>仔细看上面报的错误是 <code>jetbra/vmoptions/pycharm.vmoption</code>位置未找到，由于之前是直接下载然后在桌面解压破解的，所以那个文件夹在在桌面引用了。后面删除了导致找不到。</p>
<p><strong>1、查找资料说这个<code>/Users/mac/Library/Application\ Support/JetBrains</code> 中间mac是您的电脑用户名</strong></p>
<p>rm -rf 这个路径下的 JetBrains依旧不行。</p>
<p><strong>2、下载重新安装其他版本也还是闪退</strong></p>
<p>重新在了PyCharm2022版本依旧行不通。</p>
<p><strong>3、清除原有配置</strong></p>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">rm -rf  /Users/mac/Library/Preferences/PyCharm2021.3</span><br></pre></td></tr></table></figure>

<p>重新删除这个文件运行还是闪退。</p>
        
          <p class="article-more-link">
            <a href="/2022/09/16/technology20220916182205/#more">Read More</a>
          </p>
        
      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2022/09/16/technology20220916182205/" data-id="cmhm05vy10074p4jjgsvj5k6h" class="article-share-link" data-share="baidu" data-title="Pycharm运行闪退报parseVMOptions PYCHARM_VM_OPTIONS">分享到</a>
      

    
  <a href="https://kziwws.github.io/2022/09/16/technology20220916182205/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/python/" rel="tag">python</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/technology/" rel="tag">technology</a></li></ul>

    </footer>
  </div>
  
</article>

  
    <article id="post-technology20220103111021" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2022/01/03/technology20220103111021/" class="article-date">
  <time datetime="2022-01-03T03:10:21.000Z" itemprop="datePublished">2022-01-03</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/knowledge/">knowledge</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2022/01/03/technology20220103111021/">如何解绑微信小程序游戏</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>本文将介绍如何在手机上解绑微信小程序，并提供详细的操作步骤和截图，帮助您顺利解除与小程序的关联。</p>
<p>打开微信应用 首先，确保您已经打开了微信应用程序并登录到自己的账号。</p>
<h4 id="1、微信里进入-【小程序助手】"><a href="#1、微信里进入-【小程序助手】" class="headerlink" title="1、微信里进入 【小程序助手】"></a>1、微信里进入 【小程序助手】</h4><p>微信小程序。可以通过微信聊天界面中的小程序图标进入，也可以通过微信中的“发现”–&gt;“小程序”进入。在小程序界面中，我们可以看到所有已经添加的小程序，以及个人信息等选项。备注：这个小程序名字就是叫《小程序助手》</p>
<h4 id="2、找到需要解绑的小程序"><a href="#2、找到需要解绑的小程序" class="headerlink" title="2、找到需要解绑的小程序"></a>2、找到需要解绑的小程序</h4><p>在【小程序助手】管理页面中，浏览已关联的小程序列表，找到您需要解绑的小程序。<br><a href="https://imgse.com/i/pCM0d8U" target="_blank" rel="noopener"><br>    <img src="https://s1.ax1x.com/2023/06/16/pCM0d8U.jpg" alt="图片描述" width="375" height="667"><br></a></p>
<h4 id="3、点击顶部要解绑的小程序"><a href="#3、点击顶部要解绑的小程序" class="headerlink" title="3、点击顶部要解绑的小程序"></a>3、点击顶部要解绑的小程序</h4><p>在您找到需要解绑的小程序后，点击对应小程序顶部按钮。<br><a href="https://imgse.com/i/pCM0w2F" target="_blank" rel="noopener"><br>    <img src="https://s1.ax1x.com/2023/06/16/pCM0w2F.jpg" alt="图片描述" width="375" height="667"><br></a></p>
<h4 id="4、进入【解绑】页面"><a href="#4、进入【解绑】页面" class="headerlink" title="4、进入【解绑】页面"></a>4、进入【解绑】页面</h4><p>在小程序的设置页中，找到“解绑”选项，点击进入【解绑】页面。<br><a href="https://imgse.com/i/pCM0aCT" target="_blank" rel="noopener"><br>    <img src="https://s1.ax1x.com/2023/06/16/pCM0aCT.jpg" alt="图片描述" width="375" height="667"><br></a></p>
<h4 id="5、确认解绑操作"><a href="#5、确认解绑操作" class="headerlink" title="5、确认解绑操作"></a>5、确认解绑操作</h4><p>在【解绑】页面中，系统将提醒您解绑后将无法再使用该小程序的相关功能。请仔细阅读提示并确认解绑操作。</p>
<h4 id="6、点击【解绑】按钮"><a href="#6、点击【解绑】按钮" class="headerlink" title="6、点击【解绑】按钮"></a>6、点击【解绑】按钮</h4><p>在确认无误后，点击页面底部的“解绑”按钮，完成解绑操作。</p>
<p>注意事项：</p>
<ul>
<li>解绑小程序后，您将无法再访问和使用该小程序的相关功能。请确保您不再需要与该小程序有任何关联。</li>
<li>解绑小程序不会删除您的个人信息或数据。如果您需要删除与该小程序相关的个人信息，请联系小程序开发者。</li>
<li>在解绑小程序之前，您可以备份和保存与该小程序相关的任何数据或信息。</li>
</ul>
<p>通过以上步骤，您可以在手机上轻松解绑微信小程序。请确保您在解绑之前仔细阅读提示信息并确认解绑操作，以免造成不必要的麻烦。如果您需要重新关联或有任何问题，请联系小程序的开发者或寻求微信客服的帮助。</p>

      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2022/01/03/technology20220103111021/" data-id="cmhm05vy10070p4jj9jdn20k1" class="article-share-link" data-share="baidu" data-title="如何解绑微信小程序游戏">分享到</a>
      

    
  <a href="https://kziwws.github.io/2022/01/03/technology20220103111021/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/knowledge/" rel="tag">knowledge</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/technology/" rel="tag">technology</a></li></ul>

    </footer>
  </div>
  
</article>

  
    <article id="post-technology20211210100122" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2021/12/10/technology20211210100122/" class="article-date">
  <time datetime="2021-12-10T02:01:22.000Z" itemprop="datePublished">2021-12-10</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/charles/">charles</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2021/12/10/technology20211210100122/">Mac青花瓷Charles抓包使用详解</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p><a href="https://imgtu.com/i/7TVvvD" target="_blank" rel="noopener"><img src="https://s4.ax1x.com/2022/01/24/7TVvvD.png" alt=""></a></p>
<h5 id="Charles青花瓷是一个HTTP代理服务器-HTTP监视器-反转代理服务器，当程序连接Charles的代理访问互联网时，Charles可以监控这个程序发送和接收的所有数据。它允许一个开发者查看所有连接互联网的HTTP通信，这些包括request-response和HTTP-headers-（包含cookies与caching信息）。"><a href="#Charles青花瓷是一个HTTP代理服务器-HTTP监视器-反转代理服务器，当程序连接Charles的代理访问互联网时，Charles可以监控这个程序发送和接收的所有数据。它允许一个开发者查看所有连接互联网的HTTP通信，这些包括request-response和HTTP-headers-（包含cookies与caching信息）。" class="headerlink" title="Charles青花瓷是一个HTTP代理服务器,HTTP监视器,反转代理服务器，当程序连接Charles的代理访问互联网时，Charles可以监控这个程序发送和接收的所有数据。它允许一个开发者查看所有连接互联网的HTTP通信，这些包括request, response和HTTP headers （包含cookies与caching信息）。"></a>Charles青花瓷是一个HTTP代理服务器,HTTP监视器,反转代理服务器，当程序连接Charles的代理访问互联网时，Charles可以监控这个程序发送和接收的所有数据。它允许一个开发者查看所有连接互联网的HTTP通信，这些包括request, response和HTTP headers （包含cookies与caching信息）。</h5><p><font color="#B22222">青花瓷 v 4.6.2</font>下载链接 <a href="https://www.charlesproxy.com/assets/release/4.6.2/charles-proxy-4.6.2.dmg?k=ba07c34dbd" target="_blank" rel="noopener">点击下载 macOS (dmg, 54.3 MB)<br>Compatible with macOS 10.7 - 10.15</a></p>
<p>青花瓷注册码<br>Registered Name: <code>https://zhile.io</code><br>License Key: <code>48891cf209c6d32bf4</code></p>
<p>打开charles–help–register charles 输入上面注册码，然后就可以使用了</p>
<p><strong>使用步骤</strong></p>
<ul>
<li><a href="#certificate_install">安装Mac证书 浏览器请求抓包</a></li>
<li><a href="#client_install">移动客户端请求抓包</a></li>
</ul>
<h6 id="一、安装Mac证书"><a href="#一、安装Mac证书" class="headerlink" title="一、安装Mac证书"></a><a name='certificate_install'><font color="black">一、安装Mac证书</font></a></h6><p><code>Charles主界面</code> -&gt;<code>Help</code> -&gt; <code>SSL Proxying</code> -&gt;<code>Install Charles Root Certificate</code> </p>
<p><a href="https://imgtu.com/i/7TZ3GV" target="_blank" rel="noopener"><img src="https://s4.ax1x.com/2022/01/24/7TZ3GV.png" alt=""></a></p>
<p>然后在钥匙串找到 Charles Root Certificate 证书，我这边显示Charles Proxy CA ，然后系统默认是不信任Charles的证书的，此时<code>右键证书</code>-&gt;<code>显示简介</code> -&gt; <code>信任</code>中<code>使用此证书时</code>，把<code>使用系统默认</code>改为<code>始终信任</code></p>
        
          <p class="article-more-link">
            <a href="/2021/12/10/technology20211210100122/#more">Read More</a>
          </p>
        
      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2021/12/10/technology20211210100122/" data-id="cmhm05vy1006wp4jjczb60758" class="article-share-link" data-share="baidu" data-title="Mac青花瓷Charles抓包使用详解">分享到</a>
      

    
  <a href="https://kziwws.github.io/2021/12/10/technology20211210100122/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/mac/" rel="tag">mac</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/technology/" rel="tag">technology</a></li></ul>

    </footer>
  </div>
  
</article>

  
    <article id="post-technology20211010110234" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2021/10/10/technology20211010110234/" class="article-date">
  <time datetime="2021-10-10T03:02:34.000Z" itemprop="datePublished">2021-10-10</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/flutter/">flutter</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2021/10/10/technology20211010110234/">flutter基础学习</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>最近学习了一周flutter,做了一下笔记，之前看到一个推荐入门的视频，初步看了一下很不错，推荐给大家。<strong><strong><a href="https://www.bilibili.com/video/BV1kh411a7Lr?p=2" target="_blank" rel="noopener">全新升级小码哥Flutter实战教学完整版附资料</a></strong></strong> ，如果有Android和IOS原生开发经验的感觉学起来是相对好理解一点。最后面也分享一下写的一个页面代码，由于最近一周公司内部的业务笔记多相对较忙，然后断断续续的学。</p>
<p><font color="#B22222">1、</font>stl 回车快捷键创建 <code>StatelessWidget</code>。</p>
<p><font color="#B22222">2、</font>如果像<code>IOS UITableViewCell</code>中子视图设置间距的话，可以使用<code>SizeBox(height: 8)</code>,就是设置上下之前的控件距离8个像素，<br>有点类似<code>IOS ToolBar</code>中添加多个item时的 <code>UIBarButtonSystemItemFlexibleSpace.</code></p>
<p><font color="#B22222">3、</font>去掉APP展示<code>debug LOGO</code>时在启动 MaterialAPP内 使用<code>debugShowCheckedModeBanner: false</code>。</p>
<p><font color="#B22222">4、</font> 关于widget 有状态的Widget:StatefulWidget在运行过程中有一些状态data数据需要改变，无状态的widget:StatelessWidget内容是确定的没有状态data数据的改变。</p>
<p><font color="#B22222">5、</font>两个组件widget并排时用Row组件可以放多个组件，想要水平居中，使用Center组件包裹。想要Row里面的子元素在父widget x轴居中 使用<code>mainAxisAlignment: MainAxisAlignment.center.</code></p>
<p><font color="#B22222">6、</font>想要子元素垂直流水布局使用Cloumn组件，也是widget但是如果里面的元素超出手机最大长度，就是不能滚动的区域，会展示黄色条纹斑马线的多余区域，解决办法就是使用ListView 可滚动的widget。</p>
<p><font color="#B22222">7、</font>使用网络加载图片<code>Image.network(url)</code>。</p>
<p><font color="#B22222">8、</font>statelessWidget里的属性必须是不可修改的 用<code>final</code>修饰。并且是实现构造函数就是当前类型传进去的命名的各个参数。</p>
<p><font color="#B22222">9、</font>如果使用Checkbox组件有按钮点击回调参数如 <code>onChangeed:(value) =&gt;flag = value.</code></p>
<p><font color="#B22222">10、</font>@immutable注解标明的类或者子类都必须是不可变的。所以比如statelessWidget类的属性用final修饰。</p>
<p><font color="#B22222">11、</font>StatefullWidget继承自StatefulWidget的类(可以接受父Widget传过来的数据/state类(状态))。StatefulWidget 要实现 <code>createState()</code>方法，然后实现State类 这个类就是实现可变的属性。</p>
<p><font color="#B22222">12、</font>如果实现边框和内间距可以使用Container，<code>alt + enter</code> 快捷键可实现一个Widget快速包裹一个Container. Container其中有一个属性decoration翻译过来为装饰，<code>BoxDecoration(border: Border.all( width: 5</code>,//设置边框的宽度, <code>color: Colors.purple</code>//设置边框的颜色))。如果设置Container内间距(子视图到Container的内部间距) padding: EdgeInsets.all(8) 上下左右为8个像素的间距。</p>
<p><font color="#B22222">13、</font>Text组件中的textAlign相当于IOS中的UILable中的属性<code>textAlignment</code>。</p>
<p><font color="#B22222">14、</font>Column中属性主轴和交叉轴 <code>mainAxisAlignment: MainAxisAlignment.center</code> 交叉轴<code>crossAxisAlignment: CrossAxisAlignment.start</code>(就是开始元素在) Column中开始最左边显示。如果<code>CrossAxisAlignment.end</code> 从右边开始显示相当于。(Column垂直方向就是主轴，Row来说水平方向是主轴).</p>
<p><font color="#B22222">14、</font>一个类中如果有@protected 如: <code>createState()</code>修饰表示该方法是必须实现的。widget类是不加下划线的，暴露给别人使用,State是加下划线的，状态这个类只给widget使用。为什么Flutter在设计的时候StatefulWidget的build方法放在State中？原因有 一、build出来的Widget是需要依赖State中的变量(状态/数量) 二、在运行的过程中 widget是不断的销毁和创建的。当自己的状态发生改变时，并不希望重新创建一个新的State类。</p>
<p><font color="#B22222">15、</font>RaisedButton按钮组件 <code>Raisebutton( child; Icon(Icons.add)),onPressed:()=&gt; print(&quot;点击+&quot;)) Icon</code>是展示图标。</p>
<p><font color="#B22222">16、</font>如果在State状态类中想可变的参数和不可变的参数（接受StatefulWidget的值时），State本身会持有所归属的widget组件，所以在StatefulWidget类中之间申请属性然后直接可以使用<code>${widget.message}</code> 这儿的widget就是前面自定义的StatefulWidget组件 message属性就是自定义的StatefulWidget类的属性。</p>
<p><font color="#B22222">17、</font>StatelessWidget的生命周期： 只有本身的构造方法和<code>build(BuildContext context)</code>方法。<br>   StatefulWidget 的生命周期包括两个类widget和state，其中StatefulWidget的生命周期是<code>Constructor</code>、<code>Widget.createState()</code>. State类生命周期 先调用Constructor（构造方法）、initState(初始化状态)、<code>didChangeDependencies</code>(状态值发生改变的时候)、<code>build</code>、<code>dispose</code>(销毁方法)，这儿如果子类中实现了initState方法，这个方法在父内中是@mustCallSuper意思是自内必须调用的。调用会对父类做一些初始化，同理dispose方法也是一样子。</p>
<p><font color="#B22222">18、</font>state类里调用<code>setState(VoidCallback fn)</code>，会去先执行fn(),然后setState里会去执行<code>markneedsBuild()</code>方法，然后去执行build(),刷新UI。</p>
<p><font color="#B22222">19、</font>带边框的按钮OutlineButton、平坦的按钮FlatButton、浮动按钮<code>FloatingActionButton(child: Icon(Icons.add),onPressed:()=&gt;)</code>、凸出的按钮RaiseButton.</p>
<p><font color="#B22222">20、</font>当自定义按钮时<code>FlatButton(color: Colors.red,child: Row(mainAxisSize: MainAxisSize.max,children: &lt;widget&gt;[Icon(Icons.favorite,color: Colors.red,),Text(&quot;A&quot;)]),onPressed:(){})</code>, mainAxisSize 主轴上的大小。</p>
<p><font color="#B22222">21、</font>FlatButton使用圆角时<code>shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8))</code>。</p>
<p><font color="#B22222">22、</font>加载图片<code>Image(image: NetworkImage(&quot;https://~&quot;)),width: 200,height:200,fit:BoxFit.fitWidth,alignment: Alignment.BottomCenter)</code>。其中如果设置了图片的背景颜色是会覆盖在最上层，不过可以设置颜色混入模式与图片融合一体，<code>color: Colors.red,colorBlendMode: BlendMode.colorDodge</code>.</p>
        
          <p class="article-more-link">
            <a href="/2021/10/10/technology20211010110234/#more">Read More</a>
          </p>
        
      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2021/10/10/technology20211010110234/" data-id="cmhm05vy0006tp4jjb6xrb41z" class="article-share-link" data-share="baidu" data-title="flutter基础学习">分享到</a>
      

    
  <a href="https://kziwws.github.io/2021/10/10/technology20211010110234/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/flutter/" rel="tag">flutter</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/technology/" rel="tag">technology</a></li></ul>

    </footer>
  </div>
  
</article>

  
    <article id="post-poetry20210821102025" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2021/08/21/poetry20210821102025/" class="article-date">
  <time datetime="2021-08-21T02:20:25.000Z" itemprop="datePublished">2021-08-21</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E8%AF%97/">诗</a>►<a class="article-category-link" href="/categories/%E8%AF%97/%E8%AF%97%E8%AF%8D/">诗词</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2021/08/21/poetry20210821102025/">《晚秋》</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>庭前落尽梧桐，红尘尽染萧风。<br>黄粱舞色一梦，承旧已逝春秋。<br>贫富孰与睢鸠，黄泉背赴一宿。<br>叶落参差为何？黄昏秃柳间驹。<br>劳陇头五六清，道尽天下三分。<br>日暮剪烛皈客，人言西沉可多。</p>
<p>by:霜</p>

      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2021/08/21/poetry20210821102025/" data-id="cmhm05vxu003up4jj4mwdfc41" class="article-share-link" data-share="baidu" data-title="《晚秋》">分享到</a>
      

    
  <a href="https://kziwws.github.io/2021/08/21/poetry20210821102025/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/poetry/" rel="tag">poetry</a></li></ul>

    </footer>
  </div>
  
</article>

  
    <article id="post-technology20201105160509" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/11/05/technology20201105160509/" class="article-date">
  <time datetime="2020-11-05T08:05:09.000Z" itemprop="datePublished">2020-11-05</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/error/">error</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2020/11/05/technology20201105160509/">CocosCreator运行自带的模拟器报spawn python ENOENT</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h5 id="CocosCreator在运行时浏览器里正常，在自带的模拟器上会报错，错误如下："><a href="#CocosCreator在运行时浏览器里正常，在自带的模拟器上会报错，错误如下：" class="headerlink" title="CocosCreator在运行时浏览器里正常，在自带的模拟器上会报错，错误如下："></a>CocosCreator在运行时浏览器里正常，在自带的模拟器上会报错，错误如下：</h5><p><font color="red">Error: spawn python ENOENT </font><br>at Process.onexit (internal/child_process.js:267:19)<br>at onErrorNT (internal/child_process.js:469:16)<br>at processTicksAndRejections (internal/process/task_queues.js:84:21)<br>errno: ‘ENOENT’,<br>code: ‘ENOENT’,<br>/syscall: ‘spawn python’,<br> path: ‘python’,<br> spawnargs: [<br> ‘-c’,<br> &lt;Buffer 69 6d 70 6f 72 74 20 6c 6f 63 61 6c 65 0a 0a 73 79 73 5f 6c  61 6e 67 2c 20 65 6e 63 6f 64 69 6e 67 20 3d 20 6c 6f 63 61 6c 65 2e 67  65 74 64 65 66 61 … 28 more bytes&gt;<br> ]</p>
<p>看上面提示好像是python版本的原因，之前可能是下载过python升级过然后在python3找不到。</p>
<p><font color="green"><strong><em>解决办法：</em></strong></font></p>
<p><strong>一、查看python的路径</strong></p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">which python</span><br></pre></td></tr></table></figure>

<p>如果没有安装，直接下载安装一个python2.7的pkg安装包， <a href="https://links.jianshu.com/go?to=https%3A%2F%2Fwww.python.org%2Fftp%2Fpython%2F2.7.18%2Fpython-2.7.18-macosx10.9.pkg" target="_blank" rel="noopener">下载地址</a>，然后安装过后，在重新运行。</p>
<p><strong>二、如果已经安装</strong></p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">vim ~/.zshrc</span><br><span class="line">export PYTHON_PATH = 上面第一步得到python路径地址，例如：/usr/local/bin/python</span><br><span class="line">source ~/.zshrc</span><br></pre></td></tr></table></figure>

<p>然后重启mac 就是重启过后找到python</p>
<p><strong>三、如果存在python3然后找不到python可以建立软连接</strong></p>
<p>删除原有的软链接</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">rm -rf /usr/bin/python</span><br></pre></td></tr></table></figure>
<p>根据查询的python3位置，创建自己的软链接，</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">which python3</span><br></pre></td></tr></table></figure>
<p>如上诉查询出来的是python3的位置的安装位置是: /usr/local/python3/bin/python3</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ln -s /usr/local/python3/bin/python3 /usr/bin/python</span><br></pre></td></tr></table></figure>



<h5 id="CocosDashboard不能打开，点击打开闪退："><a href="#CocosDashboard不能打开，点击打开闪退：" class="headerlink" title="CocosDashboard不能打开，点击打开闪退："></a>CocosDashboard不能打开，点击打开闪退：</h5><p><font color="green"><strong><em>解决办法：</em></strong></font></p>
<p>找到你的Mac电脑目录: 这儿比如说你的电脑名字叫mac就是以下目录</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">/Users/mac/.CocosCreator </span><br><span class="line">/Users/mac/.Cocos</span><br></pre></td></tr></table></figure>

<p>这儿如果你进入了过后不显示 .开头的了目录文件可按住同时按住 <code>shift + command + .</code>然后就会显示.CocosCreator 和 .Cocos，然后删除掉文件夹重新打开CocosDashboard。</p>
<p>这个是项目资源出错问题，一般如果找到出错的项目，重新打开也是可以正常运行。</p>

      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2020/11/05/technology20201105160509/" data-id="cmhm05vy0006lp4jj5x8e7ael" class="article-share-link" data-share="baidu" data-title="CocosCreator运行自带的模拟器报spawn python ENOENT">分享到</a>
      

    
  <a href="https://kziwws.github.io/2020/11/05/technology20201105160509/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/python/" rel="tag">python</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/technology/" rel="tag">technology</a></li></ul>

    </footer>
  </div>
  
</article>

  
    <article id="post-poetry20200528021344" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/05/28/poetry20200528021344/" class="article-date">
  <time datetime="2020-05-27T18:13:44.000Z" itemprop="datePublished">2020-05-28</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E8%AF%97/">诗</a>►<a class="article-category-link" href="/categories/%E8%AF%97/%E8%AF%97%E8%AF%8D/">诗词</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2020/05/28/poetry20200528021344/">《掩埋》</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>笑雨春风夕迟顾，青山遗忘任几出，无数，彷徨来时路。<br>青春荏苒流光束，寒红尤染雪里途，昙华，残刃何年纷葬墓。</p>
<p>by:霜</p>

      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2020/05/28/poetry20200528021344/" data-id="cmhm05vxt003rp4jj7yddgj6i" class="article-share-link" data-share="baidu" data-title="《掩埋》">分享到</a>
      

    
  <a href="https://kziwws.github.io/2020/05/28/poetry20200528021344/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/poetry/" rel="tag">poetry</a></li></ul>

    </footer>
  </div>
  
</article>

  
    <article id="post-poetry20200514110322" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/05/14/poetry20200514110322/" class="article-date">
  <time datetime="2020-05-14T03:03:22.000Z" itemprop="datePublished">2020-05-14</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E8%AF%97/">诗</a>►<a class="article-category-link" href="/categories/%E8%AF%97/%E8%AF%97%E8%AF%8D/">诗词</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2020/05/14/poetry20200514110322/">《千嶂古木昏》</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>千嶂厌浥，红楼过淅沥。取次草莺风嘻戏，沧澜重逢落残棋。<br>轻诋哀梨蒸食，川行东流人顾昏，捕云不休未前门，万里行舟浪迹深。</p>
<p>by:霜</p>

      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2020/05/14/poetry20200514110322/" data-id="cmhm05vxt003lp4jjhiszekzg" class="article-share-link" data-share="baidu" data-title="《千嶂古木昏》">分享到</a>
      

    
  <a href="https://kziwws.github.io/2020/05/14/poetry20200514110322/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/poetry/" rel="tag">poetry</a></li></ul>

    </footer>
  </div>
  
</article>

  
    <article id="post-poetry20200510100216" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/05/10/poetry20200510100216/" class="article-date">
  <time datetime="2020-05-10T02:02:16.000Z" itemprop="datePublished">2020-05-10</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E8%AF%97/">诗</a>►<a class="article-category-link" href="/categories/%E8%AF%97/%E8%AF%97%E8%AF%8D/">诗词</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2020/05/10/poetry20200510100216/">《难》</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>素鸡诚。面围纶。直味中规不合饂。<br>暂声切。火煨炙。熟梨蒸食，实指为瞒。<br>难。难。难。<br>腹中宴。心切馋。人急伴作深巷湾。<br>拟情还。待君观。历三红愿，再点前缘。<br>伴。伴。伴。</p>
<p>by:霜</p>

      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2020/05/10/poetry20200510100216/" data-id="cmhm05vxt003op4jjhpuo1gwf" class="article-share-link" data-share="baidu" data-title="《难》">分享到</a>
      

    
  <a href="https://kziwws.github.io/2020/05/10/poetry20200510100216/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/poetry/" rel="tag">poetry</a></li></ul>

    </footer>
  </div>
  
</article>

  
    <article id="post-poetry20200430120106" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/04/30/poetry20200430120106/" class="article-date">
  <time datetime="2020-04-30T04:01:06.000Z" itemprop="datePublished">2020-04-30</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E8%AF%97/">诗</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2020/04/30/poetry20200430120106/">《心徜徉》</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>云卷谧疏层羽暮，斜阳卸下殇情袱。<br>作苦诗词风勤雨，许趁惊鸿绘婉玉。<br>入梦枕枝残片香，卿月此身伴君长。<br>凭栏共赏心徜徉，从此不再话沧桑。</p>
<p>by:霜</p>

      
    </div>
    <footer class="article-footer">
      
        <a data-url="https://kziwws.github.io/2020/04/30/poetry20200430120106/" data-id="cmhm05vxt003ip4jj9c6u2lxw" class="article-share-link" data-share="baidu" data-title="《心徜徉》">分享到</a>
      

    
  <a href="https://kziwws.github.io/2020/04/30/poetry20200430120106/#valine_thread" class="article-comment-link">评论</a>


      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/poetry/" rel="tag">poetry</a></li></ul>

    </footer>
  </div>
  
</article>

  


  <nav id="page-nav">
    <a class="extend prev" rel="prev" href="/">上一页</a><a class="page-number" href="/">1</a><span class="page-number current">2</span><a class="page-number" href="/page/3/">3</a><a class="page-number" href="/page/4/">4</a><span class="space">&hellip;</span><a class="page-number" href="/page/8/">8</a><a class="extend next" rel="next" href="/page/3/">下一页</a>
  </nav>
</section>
      
      <aside id="sidebar">
  
    
<div class="widget-wrap">
  <h3 class="widget-title">关于</h3>
  <ul class="widget about-me">
    
    <li><img class="author" title="About me" src="/img/github.png" /></li>
    
    
    <li ><font color="#424242" size="2em">苹果应用软件开发 & 游戏软件开发</font></li>
    
    <li ><font color="#424242" size="2em">email: ggb.chen@foxmail.com</font></li>
    
  </ul>
</div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/charles/">charles</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/cocoapods/">cocoapods</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/cocosCreator/">cocosCreator</a><span class="category-list-count">8</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/error/">error</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/flutter/">flutter</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/git/">git</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/hexo/">hexo</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/ios/">ios</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/knowledge/">knowledge</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/python/">python</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/regexp/">regexp</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E8%AF%97/">诗</a><span class="category-list-count">46</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/%E8%AF%97/%E8%AF%97%E6%AD%8C/">诗歌</a><span class="category-list-count">9</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E8%AF%97/%E8%AF%97%E8%AF%8D/">诗词</a><span class="category-list-count">23</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E8%AF%97/%E8%BD%AC%E5%BD%95/">转录</a><span class="category-list-count">1</span></li></ul></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">标签</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/android/" rel="tag">android</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cocoapods/" rel="tag">cocoapods</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cocosCreator/" rel="tag">cocosCreator</a><span class="tag-list-count">8</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/flutter/" rel="tag">flutter</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/" rel="tag">git</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo/" rel="tag">hexo</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ios/" rel="tag">ios</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/knowledge/" rel="tag">knowledge</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mac/" rel="tag">mac</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/poetry/" rel="tag">poetry</a><span class="tag-list-count">46</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python/" rel="tag">python</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/regexp/" rel="tag">regexp</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/technology/" rel="tag">technology</a><span class="tag-list-count">29</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">标签云</h3>
    <div class="widget tagcloud">
      <a href="/tags/android/" style="font-size: 11.67px;">android</a> <a href="/tags/cocoapods/" style="font-size: 10px;">cocoapods</a> <a href="/tags/cocosCreator/" style="font-size: 16.67px;">cocosCreator</a> <a href="/tags/flutter/" style="font-size: 11.67px;">flutter</a> <a href="/tags/git/" style="font-size: 10px;">git</a> <a href="/tags/hexo/" style="font-size: 15px;">hexo</a> <a href="/tags/ios/" style="font-size: 13.33px;">ios</a> <a href="/tags/knowledge/" style="font-size: 10px;">knowledge</a> <a href="/tags/mac/" style="font-size: 10px;">mac</a> <a href="/tags/poetry/" style="font-size: 20px;">poetry</a> <a href="/tags/python/" style="font-size: 13.33px;">python</a> <a href="/tags/regexp/" style="font-size: 10px;">regexp</a> <a href="/tags/technology/" style="font-size: 18.33px;">technology</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <!--<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2025/11/">十一月 2025</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/09/">九月 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/03/">三月 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/02/">二月 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/01/">一月 2023</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/10/">十月 2022</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/09/">九月 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/01/">一月 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/12/">十二月 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/10/">十月 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/08/">八月 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/11/">十一月 2020</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/05/">五月 2020</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/04/">四月 2020</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/03/">三月 2020</a><span class="archive-list-count">15</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/02/">二月 2020</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/01/">一月 2020</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/12/">十二月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/10/">十月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/09/">九月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/">八月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/07/">七月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">六月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/05/">五月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/03/">三月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/01/">一月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/12/">十二月 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/11/">十一月 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/08/">八月 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/07/">七月 2018</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/06/">六月 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/">三月 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">二月 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/01/">一月 2018</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/06/">六月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">十二月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/02/">二月 2015</a><span class="archive-list-count">5</span></li></ul> -->
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2025/11/">2025年</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/09/">2023年</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/10/">2022年</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/12/">2021年</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/11/">2020年</a><span class="archive-list-count">26</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/12/">2019年</a><span class="archive-list-count">13</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/12/">2018年</a><span class="archive-list-count">14</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/06/">2017年</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">2015年</a><span class="archive-list-count">6</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">近期文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2025/11/05/technology20251105090825/">Sudoku Game Privacy Policy_ Zero Personal Data Collection, Pure Gaming Experience</a>
          </li>
        
          <li>
            <a href="/2023/09/10/technology20230910111821/">Hexo博客部署常见问题及解决方案</a>
          </li>
        
          <li>
            <a href="/2023/03/14/technology20230314101225/">利用python脚本拆解游戏中的图集资源</a>
          </li>
        
          <li>
            <a href="/2023/02/10/technology20230210090112/">利用jekenis自动打包上传阿里云下载和通知钉钉机器人</a>
          </li>
        
          <li>
            <a href="/2023/01/21/technology20230121151206/">IOS项目脚本自动化批量打包并上传第三方平台</a>
          </li>
        
      </ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">友情链接</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="https://github.com/kziwws" target="_blank">github</a>
          </li>
        
          <li>
            <a href="https://shevakuilin.com" target="_blank">shevakuilin</a>
          </li>
        
          <li>
            <a href="https://hans2936.github.io" target="_blank">hans2936</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
      
    </div>
    <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2015 <a href="https://github.com/kziwws" target="_blank">kziwws</a> 
      Powered by hexo,Theme by landscape-plus.
    </div>
    <div id="footer-info" class="inner">
      本站博客采用 <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/cn/" target="_blank">[知识共享署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议]</a> 进行许可
    </div>
  </div>
</footer>


<!--
<div id="footer-info" class="inner">
     &copy; 2025 kziwws<br>
      Powered by <a href="//hexo.io/" target="_blank">Hexo</a>
     .
     Theme by <a href="https://github.com/xiangming/landscape-plus" target="_blank">Landscape-plus</a>
   </div>
</div>
-->
  </div>
  <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">首页</a>
  
    <a href="/tags/technology" class="mobile-nav-link">编程技术</a>
  
    <a href="/tags/poetry" class="mobile-nav-link">诗</a>
  
    <a href="/tags/life" class="mobile-nav-link">生活随笔</a>
  
    <a href="/archives" class="mobile-nav-link">所有文章</a>
  
</nav>
  <!-- totop start -->
<div id="totop">
<a title="返回顶部"><img src="/img/scrollup.png"/></a>
</div>

<!-- totop end -->

<!--载入js，在</body>之前插入即可-->
    <!--Leancloud 操作库:-->
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <!--Valine 的核心代码库-->
    <script src="/js/Valine.min.js"></script>
    <script>
        new Valine({
            av: AV, 
            el: '.comment',
            app_id: 'zh2N00Qk2UIsu1N8Qfu468TH-gzGzoHsz',
            app_key: 'BJrjTSEoKMfc05OMLWhCzmHk',
            placeholder: '想说点什么...',
            pageSize: 15,
            notify: false,
            verify: false,
        });
    </script>


<!-- 百度分享 start -->

<div id="article-share-box" class="article-share-box">
  <div id="bdshare" class="bdsharebuttonbox article-share-links">
    <a class="article-share-weibo" data-cmd="tsina" title="分享到新浪微博"></a>
    <a class="article-share-weixin" data-cmd="weixin" title="分享到微信"></a>
    <a class="article-share-qq" data-cmd="sqq" title="分享到QQ"></a>
    <a class="article-share-renren" data-cmd="renren" title="分享到人人网"></a>
    <a class="article-share-more" data-cmd="more" title="更多"></a>
  </div>
</div>
<script>
  function SetShareData(cmd, config) {
    if (shareDataTitle && shareDataUrl) {
      config.bdText = shareDataTitle;
      config.bdUrl = shareDataUrl;
    }
    return config;
  }
  window._bd_share_config={
    "common":{onBeforeClick: SetShareData},
    "share":{"bdCustomStyle":"/css/bdshare.css"}
  };
  with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>

<!-- 百度分享 end -->

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>


  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">

  
<script src="/fancybox/jquery.fancybox.pack.js"></script>




<! -- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
                processEscapes: true
                    
}
  
        });
</script>

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
                  
}
    
        });
</script>

<script type="text/x-mathjax-config">
MathJax.Hub.Queue(function() {
            var all = MathJax.Hub.getAllJax(), i;
            for(i=0; i < all.length; i += 1) {
                            all[i].SourceElement().parentNode.className += ' has-jax';
                                    
            }
                
        });
</script>

<script type="text/javascript" src="//cdn.bootcss.com/mathjax/2.5.3/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>



<script src="/js/script.js"></script>


</div>

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="icon-search"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.local-search-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content
                  
                  var upperBound = parseInt('-1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><span id="icon-search"></span></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><span id="icon-frown"></span></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }
          
          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>
</body>
</html>

